/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package graphics;

import stealth.Main;

/**
 *
 * @author Joshua
 */
public class RendererFactory {

    public static AbstractRenderer getRenderer(){
        if(Runtime.getRuntime().availableProcessors() > 1){
            //lets go concurrent with rendering
            Main.game.getEnvInfo().put("renderer.isThreaded","true");
            //System.out.println("m");
            //return new RenderingThread();
            return new NonConcurrentRenderer();
        }
        else{
            Main.game.getEnvInfo().put("renderer.isThreaded","false");
            return new NonConcurrentRenderer();
        }
    }
}
